Communications processor for electric power substations

ABSTRACT

The communications processor includes an electronic network system which includes at total of 17 individual ports, four quad universal asynchronous receiver/transmitter devices, each of which serves four separate ports, and a microprocessor which processes and controls the flow of data under the control of stored control programs, command settings and command logic. Connected to a plurality of those ports referred to as IED ports are intelligent electronic devices IEDS, such as protective relays or meters, while connected to other ports, referred to as master ports, are remote terminal units or a local computer or terminal or a modem which can be connected to an external telephone line. The apparatus includes both buffer and long-term storage for development of a database, as well as an IRIG-B capability for synchronization of the time clocks of the connected devices.

TECHNICAL FIELD

The invention relates generally to protection systems for electric powerlines, circuit breakers and transformers, and more particularly concernsa communication processing apparatus which is to be used primarily atelectric power substations for integrating communications with andbetween the various protective devices and other supporting deviceslocated at a substation.

BACKGROUND OF THE INVENTION

Electric power systems generally include high voltage (>69KV)transmission lines from a generating means, a number of substations, anda network of distribution (<69KV) and feeder lines for the delivery ofelectric power to the customers. An electric power system typicallyincludes a number of protective relays, as well as other protectiondevices, which monitor the operation of the power system and determine,among other things, when and where a fault occurs in the system. Circuitbreaker devices are in turn controlled by the protective relays.

Historically, protective relays were mechanical or electro-mechanical (alarge number of such relays are still in use), while more recently,protective relays are typically microprocessor-based and are usuallyreferred to as digital or computer relays. These computer relaystypically record a significant amount of information for the power linesassociated with the substation, including voltages and currents on thepower lines, as well as complete “event” information relative to anyabnormal (fault) conditions. This information is stored in the memoriesof the computer relays.

The relays provide output signals, when appropriate, which are used tocontrol associated circuit breakers operating on the power lines. Theinformation stored in such relays can be transmitted to a centralfacility and/or accessed locally via a printer terminal. Comprehensivesystem monitoring is accomplished by what is known generally as a SCADAsystem, which stands for Supervisory Control and Data Acquisition, andwhich is widely known and used.

A development which resulted in some communication integration of thevarious protective relays and other supporting devices at a substationis known as a protective remote terminal unit (PRTU). The PRTU includesa modem for remote telephone communication, as well as control softwarefor basic communication purposes, and is capable of handling inputinformation from several different protective relays. The PRTU includesa simple data buffering capability, as well as a local port for aterminal, printer or computer. Another development, known as a displaytransducer adaptor (DTA), provides analog output information from thedigital information available from microprocessor-based protectiverelays. This is helpful for integration of the protective system withanalog SCADA remote terminal units. Such a system is shown in U.S. Pat.No. 5,160,926, which is assigned to the same assignee as the presentinvention.

In another system integration approach, each protective relay or otherintelligent electronic device (IED) in the protection system isconnected to a communication network bus through a network interfacemodule (NIM). Each NIM must be separately programmed to retrieve, storeand distribute IED information. A human machine interface, such as apersonal computer with a monitor, provides local control and monitoring.The system can communicate with a SCADA system through a remote terminalunit at the substation. A modem may also be included, for communicationwith remote network devices.

Some of the prior communication integration systems included thecapability of automatic scanning port-to-port for any data present atthe port data buffers. Some systems could also respond directly to aparticular port upon an indication of a fault condition recognized bythe relay connected to that port. Some terminal units had additionaldata buffering capability, enabling them to communicated with a centralmonitoring (SCADA) system or a computer system through a conventionalmodem. In some systems, the data had to be reformatted to an ASCIIformat for use by a printer. Other devices, however, were completelytransparent to the data received from their ports.

The systems described above, while achieving some communicationintegration at the substation level, were not capable of processing theinformation received from the ports, nor did those systems have adatabase capability. These disadvantages significantly limited thecapability of the communications systems. It was the applicants hereinwho recognized the full communication integration opportunities possibleat the substation level and developed an apparatus to take advantage ofthose opportunities.

SUMMARY OF THE INVENTION

Accordingly, the present invention is a communications processorapparatus for integrating communication between a plurality ofelectronic devices having data communication capability, such asprotective relays, meters, terminal devices and a computer present at agiven location in a power system, such as a substation, or connectedremotely thereto, the apparatus including an electronic network systemhaving a plurality of port positions to which electronic devices may beconnected, including at least one port position to which an apparatusfor entry of control commands may be connected and at least one portposition through which data obtained from said electronic devices may beobtained; means for storing and retrieving data obtained from theelectronic devices; means for processing data obtained from theelectronic devices; and control means for controlling the flow of dataand control commands between said ports.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a representative configuration,including the communications processor of the present invention.

FIG. 2 is a block diagram of the communications processor of the presentinvention.

FIG. 3 is a high level software data flow and command chart showing theflow of data and the flow of operations control for the communicationsprocessor of the present invention.

FIG. 4 is a listing showing the hierarchy of interrupts in thecommunications processor.

FIGS. 5A-5C are software flow chart diagrams for a portion of the chartof FIG. 3.

FIGS. 6A-6B are software flow chart diagrams for another portion of thechart of FIG. 3.

BEST MODE FOR CARRYING OUT THE INVENTION

FIG. 1 shows a simplified power system substation configuration. Thesubstation includes a pair of incoming high voltage power transmissionlines 10 and 12 connected to the high voltage side of a transformer 14.Connected to the low voltage side of the transformer 14 are a pluralityof distribution lines 16, 17, 18 and 19. Each of the transmission linesand each of the distribution lines has a circuit breaker (CB) system15—15 associated therewith. Connected to each of the high voltage lines10, 12 are a pair of protective relays, for example relays 22 and 24 forhigh voltage line 10, while connected to each of the distribution linesis one protective relay, for example relay 26 for distribution line 16.Relays 28 and 30 are connected, respectively, to the high voltage andlow voltage sides of transformer 14. The relay configuration shown inFIG. 1 is a typical arrangement for a power substation.

Each of the protective relays shown in FIG. 1 includes a particularcombination of protective elements (for example, ground and distanceelements) which provide the desired protection for the particular powerline associated with the relay. Hence, the relays on the distributionlines will have a different combination of protective elements than willthe relays for the high voltage lines and the relays on the two sides oftransformer 14.

All of these relays are connected, respectively, to an input port of thecommunications processor of the present invention, referred to generallyat 34. Communications processor 34, besides having a number of ports forconnection to protective relays, referred to as IED (IntelligentElectronic Device) ports, will also typically include at least one portfor a local printer 36, and a port to receive a modulated or demodulatedIRIG(B) time code from an external source, shown generally at 38.Additional ports for a remote terminal unit 40, a local user terminalsuch as a computer 42, and a modem connection for use with an externaltelephone line 44 are referred to herein as master ports.

In the embodiment shown, there are 16 rear panel ports and one frontpanel port for a local terminal. With respect to telephone line 44, thecommunications processor 34 can either include an internal modem, or amodem external to the processor can be used. Typically, processor 34will have a large number of ports (10-12 in the embodiment shown)capable of communicating with IEDs such as protective relays or meters,a relatively small number of “master ports” to which are connecteddevices such as computers and remote terminal units for the entry ofcommands and/or the output of data, and a small number, typically one,of ports adapted to connect with a printer. It should be understood,however, that each of the 16 rear ports can be a IED, master or printerport (the front panel port is a master port). The identification ofparticular ports as being IED, master or printer ports is for theconvenience of the user.

It should be understood that the number of ports in communicationsprocessor 34 and the particular arrangement of the ports relative to thedevices connected thereto can be changed within the spirit of thepresent invention. The present invention is thus not limited to theparticular number of ports and/or arrangement shown in FIG. 1, which isfor illustration only. FIG. 1 does illustrate, however, the basicintegration capabilities of the communications processor of the presentinvention, including the accessibility of data from each of theprotective relays at a substation, control of connected relays and otherintelligent electronic devices, the provision of synchronized timeinformation from the IRIG (B) time code input, the capability ofcommunication with a remote monitoring system through a modem/telephoneline and/or another similar communications processor, the capability ofproviding information to a local printer, and the capability ofreceiving input commands from a local or remote terminal. Commands canbe provided either at the substation through a local terminal orcomputer 42, from a remote terminal unit 40, or over the telephonelines.

It should also be understood that communications processor 34 canoperate either as a stand-alone device at a particular substation, orcan be part of a more comprehensive monitoring system, i.e. a SCADAsystem. Two or more communications processors can also be connectedtogether, i.e. cascaded, to provide increased integration at one or moresubstations.

FIG. 2 shows a basic block diagram of the communications processor 34.Communications processor 34 includes a microprocessor 50. Themicroprocessor used in the embodiment shown is a Motorola 68332, butother comparable microprocessors can be used. As will be discussedbelow, microprocessor 50 has a number of processing and controlfunctions, including an input handling function or routine and a messagegenerating function or routine for each port, as well as the executionof program instructions stored in memory which carry out the overallflow and organization of the data. These instructions are stored in ROMmemory 52. A high level software flow chart for data control and dataflow is shown in FIG. 3, which will be explained in more detail below.

The microprocessor also includes a number of configuration jumpers,which are shown collective at 54, which are responsible for establishingcertain initialization conditions, such as front panel portcommunications parameters. The microprocessor 50 also has the capabilityof providing an independent alarm output upon recognition of an alarmcondition, by means of alarm unit 56. Alarm 56 includes a light-emittingdiode (LED) visual indicator.

Microprocessor 50 is in communication with remote terminal units orother systems via a standard telephone line and a modem 58. As indicatedabove, modem 58 may either be internal to the communications processoritself or external thereto. Communications processor 34 also has, asindicated above, a time synchronization capability. Communicationsprocessor 34 accepts either a modulated or demodulated IRIG-B signalthrough a rear panel connector. If the signal is modulated, it isdemodulated at 61. An internal jumper 60 identifies whether the incomingtime signal is modulated or demodulated. The IRIG-B signal is aninternationally known, well-recognized time code signal for establishingtime synchronization.

If there is no external IRIG-B signal available, an internalclock/calendar 62, which is powered by a battery 64 when thecommunications processor is not connected to an external power source,provides a time signal which can be used for time synchronization of thevarious port-connected devices. Typically, internal clock 62 is accurateto within one minute per year, with battery 64 having an expected lifeof 10 years. The IRIG time signal (or the internal clock time signal) isapplied to a buffer 63, and then distributed to all of theport-connected devices. The communications processor 34 of the presentinvention is capable of both data communication and IRIG-B time codetransmission over a single cable.

The microprocessor 50 is in data communication with the various portdevices through a plurality of EIA-232 (RS-232) serial ports, asindicated above, shown as a group at 70. In the embodiment shown, thereare a total of 17 ports, 16 rear panel ports and one front panel port.The front panel port is typically for a local terminal unit of some kind(at the substation). Associated with each port is a level shifter 72,which adjusts the voltage level between the TTL voltage level used inthe microprocessor, which is typically 1-5 volts, and the ±12 voltlevels appropriate for EIA-232 ports.

Intermediate of level shifters 72 and the microprocessor 50 are fourquad universal asynchronous receiver transmitter devices (QUARTS). TheQUARTS each service four ports, for a total of 16 ports, while the frontpanel port in the embodiment shown is serviced by a serialcommunications interface 59 in the microprocessor 50. QUARTS are wellknown, commercially available devices, and may be purchased from variousmanufacturers, such as Signetics, Inc. Hardware communication thusextends between microprocessor 50, a QUARTS 74, a level shifter 72 andan EIA-232 serial port 70, supported by ROM memory 52 and other memorydiscussed below.

Communications processor 34 in the embodiment shown also includestransmit and receive activity LEDs for each port 70, shown generally at76. The LEDs are located on the front panel of the processor. Thus, anoperator can tell whether data is being received from or transmitted toeach device connected to the various ports.

The data received from the various devices, such as meter data, summaryevent reports, target data and status data, is temporarily stored(buffer storage) in random access memory (RAM) 78. This includes bothlocal buffer storage for the data received at the individual ports andstorage of processed data. For long-term storage, such as for savingentire event reports, “flash” memory 80 is used, which is also a RAM.Flash memory 80 is non-volatile, so that it is not lost in the event ofloss of power.

The electronically erasable, programmable, read-only memory (EEPROM) 82is used in the embodiment shown to store various setting commands(settings) provided to the apparatus through a master port, includinguser-defined commands and the command logic to implement them.Accordingly, an operator need only provide relatively simple, shortcommands to produce various repetitive or special operations by theprocessor. In the embodiment shown, a first group of command settings(for each port) includes port configuration and communicationsparameters; a second group of command settings includes buffer storagecontrol, automatic message triggers, data processing (parsing) for thatport, message control for flash memory, and user message storage. Athird group of command settings includes global parameters for theentire instrument, intermediate logic variables and input settings forthe output contacts described below. A fourth group of commands is forthe user-defined message strings or can be used to supplement or disablethe normal communications processor command set. In the embodimentshown, each port has the capability of recognizing up to eightuser-defined commands, although this can be varied.

Hence, the communications processor 34 of the present invention ischaracterized by sophisticated communication processing functions, andby comprehensive data storage, providing a substantial databasecapability within the apparatus. The communications processor 34 alsohas the capability of receiving inputs from the various protectiverelays directly through contact inputs 86. These inputs could includealarm contacts from those relays or relay failure contacts. The inputscould also include contacts from other monitoring apparatus not having adata communications capability or other power apparatus having auxiliarycontacts. An interface bus 86 connects these contact inputs with themicroprocessor 50. The communications processor 34 has contact outputs90 as well, which are used to output a trip signal, for instance, to acircuit breaker or similar device. In the embodiment shown, there are 16contact inputs and four contact outputs. Lastly, FIG. 2 also shows apower supply 92, which provides the various levels of power needed foroperation of communications processor 34.

In operation, communications processor 34 of the present invention has acapability of communicating with the various port devices thorough anASCII communication format. The ports can be individually configured tothe particular communication parameters of the connected device throughthe setting commands, including baud rate, number of data bits, stopbits, parity check, port time-out time and on-off control. This can bedone on an automatic configuration basis, through pre-programmedinstructions, if the communications processor 34 knows the requiredconfiguration for a particular device. Communication with the ports canalso be formatted so that the processor, on a port-by-port basis, may betransparent to the information from IEDs, i.e. binary information fromIEDs can be directly outputted to a local terminal or to a remotelocation via a modem. Further, processor 34 has the capability, asindicated above, of synchronizing all of the devices connected to itsvarious ports to a given date and time, either via an external IRIG(B)signal which is transmitted to the various ports along with thedata/message communication, or by an internally generated time signal.Communication with the various port-connected devices is thus quiteflexible and convenient. The structure and processing capability of theapparatus is capable of supporting simultaneous communication with allthe port-connected devices, with multiple users. Hence, communicationsprocessor 34 is a multi-task, multi-user apparatus.

FIG. 3 is a high level software design flow chart for the processorapparatus of the present invention. It is the basic design document bywhich a skilled programmer can produce the specific code to carry outthe communications processing and control functions of the presentinvention. FIGS. 5A-5C and 6A-6B show software flow chart informationfor particular portions of FIG. 3. The circles in FIG. 3 indicatespecific program routines, each of which will be described in somedetail below, while the solid, closely parallel lines represent datastorage. The solid connecting lines represent data flow paths, while thedotted connecting lines represent command control paths.

Each of the 17 ports in the embodiment shown has a basic processingroutine associated therewith, referred to as a port task or routine.FIG. 3 shows the various routines and data storage for two ports. Thisis representative, both in a global sense and in an individual portsense, of the software operation and control for all 17 individual portsand the apparatus as a whole. FIG. 3 may thus be easily expanded tocover all 17 ports.

FIG. 3 shows a port task or routine 100 associated with a first port,and a port task or routine 102 which is associated with a second port.Port task 100 is responsible for the processing and control functionsassociated with the transmission of data between the port associatedwith the port task and the device connected thereto. As indicated above,the communications processor of the present invention has 17 totalparts, 16 of which are serviced by four QUARTS. Each QUART generatesinterrupts to the microprocessor 50 for communication with each of thefour port devices connected to the QUART.

The QUART generates separate interrupts for input communication from thedevices and output communication to the devices. Microprocessor 50services the interrupts by executing an Interrupt Service Routine (ISR).As an example for one particular port, ISR 104 handles the inputcommunications for that one port serviced by a QUART, while ISR 138handles the output communications for the same port. Similar ISRs handleinput/output communications for the remaining three ports for the QUART.The data received by input ISR 104 can either be in the ASCII format,such as an input command from a terminal or modem, or in binary format,such as from a protective relay IED. The ISR input routine reads thecharacters one by one as they come in, responding to a sequence ofinterrupts from the QUART. The data is placed either in an ASCII buffer106 or a binary buffer 108, as appropriate. A message checker routine110 checks the data as it comes in to determine the end of the datastream or message.

At this point, the port task 100, which is in data communication withbuffers 106 and 108, and receives control information from the messagechecker 110, takes over. For an incoming message from an IED port, whichmay be unsolicited or in response to a periodic or special messagerequest established by the command settings, task 100 will process themessage by parsing (processing) it in accordance with variouspre-established rules established by the command settings, and thenstoring it in a buffer in Ram database 112, or if it is an event report,in long-term flash memory 114.

The port task 100 is in operation responsive via command flow lines tosettings which as discussed above have been pre-established in EEPROM orto user-defined commands, which are recognized as standing for aparticular sequence of operations which are carried out by the processorin accordance with instructions in EEPROM 117. Settings can beestablished to carry out repetitive functions. Such a setting willinclude an “issue condition”, which defines when a particular request isto be carried out by a port task, e.g. every two seconds, while a“command condition” portion of that setting establishes the particularrequest, e.g. obtain meter data from the connected IED or send a messageto a master port. In response to the occurrence of a defined issuecondition for an IED port, a bit is set in a “local target” area (141 inFIG. 3), which is recognized by the port task and which in turn makesthe associated command condition request for data from the IED. Therequest for data proceeds through transmit buffer 119 by operation ofoutput ISR 138 to the IED. When the requested data is provided by theIED (usually within a very short time), by operation of ISR 104, thelast part of the setting, which establishes the data parsing condition,is accomplished by port task 100.

Date and time functions for the apparatus are carried out by aclock-handling ISR 130. This ISR is responsible for clock maintenance,updating the clock for the apparatus, and correcting the clock forcrystal error. If an external (modulated or demodulated) IRIG time codeis present, clock handler 130 reads this particular time and applies itto date/time storage 132, which is accessible by both port task routine100 and a periodic interrupt timer ISR 118, which, among other things,runs the command logic. The clock handling ISR is also responsible formonitoring RAM storage for failures.

FIG. 3 also shows a fast meter acquisition routine 134 which isresponsive to fast meter data from binary buffer 100, after it has beenrecognized by message checker 110. The fast meter data is raw voltageand current samples which are obtained in binary form from the IEDs. Thecommunication processor 34 may calculate other quantities from the dataincluding current and voltage phasor angles. The fast meter data is thenstored in database 112.

There is a hierarchy of interrupts in the processor between the variousISRs. This is shown in FIG. 4. The highest priority is the clockhandling ISR which in the embodiment shown runs approximately every 1.0milliseconds. Then there is the front panel port ISR, the various otherport ISRs and the periodic interrupt timer (PIT) ISR, which runs every3.9 milliseconds. The various interrupts are initiated by the receiptand transmission of characters. The first thing every interrupt routinemust do is to read an interrupt register in memory to tell which port isbeing interrupted and whether it is a transmit or receive interrupt. Theappropriate ISR then uses either the receive or transmit ISR routine toaccomplish the desired action.

The function of the various port ISRs and the clock handling ISR havebeen described above. The periodic interrupt timer (PIT) ISR, asindicated above, runs the command logic present in the EEPROM whichresults in the machine instructions associated with particularuser-defined commands, but also handles many of the real time taskscheduling within the communications processor. It handles on/offsoftware procedures, referred to as XON/XOFF in the embodiment shown,for the serial ISRs, as well as initiating action of the appropriateport task when data is received at that port, as well as othermonitoring functions. There is data flow between PIT ISR 118 and local(port) targets (control bits) 141 which are set in memory, as well asglobal (apparatus) targets 143. A port task can also force an actionfrom PIT ISR 118 via setting a trigger bit 144 in memory.

The apparatus also includes a diagnostic task routine 124, which is aself-test routine monitoring the ROM, EEPROM and flash memories, as wellas the power supply. This task sets status bits 126 if failures occur.The Ram diagnostic test is handled within clock handling ISR 130, asindicated above. The status bits are recognized by the port task (e.g.port task 100), which in turn sets an alarm counter 128 for a certainperiod of time or a flag associated therewith. Alarm handler 132 causesan alarm contact to be closed for the specific period of time orpermanently, if the flag has been set.

The null task 139 is initiated upon power on of the apparatus. It is aroutine which initializes all of the other routines/tasks in theapparatus.

As indicated above, operation of the processor is determined by commandsettings provided for each port, including user-defined commands whichare carried out via the command logic is EEPROM. When the issuecondition portion of a setting for a particular port device isrecognized, a local target flag 141 is set, and port task routine 100issues a request for certain data established by the command conditionportion of the setting, by operation of output ISR 138 to the IEDconnected to the port. The relay then sends back the requested data,usually very quickly (within a few seconds or less). The received datacharacters are buffered into the apparatus through input ISR 104,processed by the port task routine, and then stored temporarily in RAMdatabase 112. If the input is recognized as being fast meter binary datafrom those relays capable of providing raw voltage and current data,that information is recognized by the message clock routine 110,processed by the fast meter routine 134, and also stored in the RAMdatabase.

It is important to understand that each port has significant processingcapability associated therewith, including a port task routine, serialinput and output ISRs, a message checker, ASCII and binary inputbuffers, a transmit buffer and a fast meter data acquisition task. Theport task has a data communication capability with RAM, flash and EEPROMmemories and is responsive to flags set in the local and global target(control bit) areas in memory. The port task also has the capabilitythrough setting a trigger bit in trigger storage 144 to override thenormal logic for a particular bit. There are three buffers associatedwith each serial port, an ASCII receive buffer, a binary receive bufferand a transmit buffer. These buffers are used to move data between theserial ISRs (both input and output) and the port tasks.

Associated with each port is a port data structure in Ram memory. Withinthe port data structure are five data fields used for inter-processcommunication within the apparatus. There is an operation field whichindicates the pending operations for the particular port task. There isalso a type field which indicates the type of device connected to theport, a mode field which indicates whether the port is currently intransparent or direct mode, a requester field which is used in somecommunication processes to indicate which other port task is requestinga particular process of the port, and a request code field which is usedto define the nature of that request.

Within each port structure in addition are flags and timers which areused by the serial and PIT ISRs for controlling data communication.These include, among others, XON and XOFF flags, initiate transmission,transmission completed and end-of-message flags. The input buffers arealso within the port data structure.

The data which has been stored in the database 112 can either be viewed,with an appropriate command, or sent out any port or ports, either inresponse to a particular command or automatically, in response touser-defined commands recognized by the port receiving the command. Amap command can also be used to see the organization of the data in aport database. Upon completion of input handling by the input ISR forthe port receiving the command, a bit is set. The bit is recognized byport task 100 and the desired data is then retrieved from database 112.The data is formatted properly for the device to which the data is to betransmitted and then directed through the transmit ISR 138 to theselected local terminal or over a telephone line to a remote terminalapparatus.

The transmitted information, as briefly noted above, has been previouslyprocessed by the port task upon the receipt thereof from a port devicesuch as an IED. This process is referred to as parsing. The incomingdata from the IEDs is parsed in accordance with certain rules. Parsingbasically is designed to produce the smallest useful element or bytesize of the data. This reduces the communication and processing burdenfor other devices by permitting them to request and obtain only thespecific data they need. Parsing can be accomplished in a number ofconventional ways, including saving of numbers only (ASCII integer),saving of numbers plus any decimals (ASCII float), saving of all numbersand characters in a character string and a most significant/leastsignificant byte arrangement. Other types of parsing may be used aswell.

Data which comes into the communications processor apparatus from an IEDport in response to a command or request message is referred to as asolicited message. These messages can be parsed and stored, as indicatedabove, in database 112. Another type of message received from the portdevices is an unsolicited message, i.e. data which is sent to itsassociated port without a specific request. These unsolicited messagesinclude commands from a local or remote PC, as well as messages whichare sent automatically by IED devices to report specific activity orconditions recognized by a protective relay IED. These include eventreport summaries, status reports and group setting switch reports whichindicate a change in the group settings of a particular relay.Unsolicited command messages can either be messages which thecommunications processor is specifically programmed to recognize, oruser-defined commands which set control bits which are then used by thecommand logic to carry out the desired machine functions.

In addition to the above, there are other important processing routineswhich occur in the apparatus. For instance, processing isinitiated/terminated by XON and XOFF characters. When such a characteris received in an input ASCII data stream at a particular port, it doesnot go into the ASCII buffer. Instead, it sets an appropriate flag,which is used to enable or disable the transmit ISR. In the embodimentshown, if an input buffer, either binary or ASCII, exceeds 75% of itscapacity, an XOFF flag is set. The transmit ISR reads this flag andinserts an XOFF character into its output data stream. Subsequently,when it is detected that the input buffer has dropped below 25%capacity, an XON flag is set. The transmit ISR reads this flag andinserts an XON character into its output data stream. Once an XOFF flaghas been recognized by an ISR, the only valid character to betransmitted by the ISR subsequently is an XON or XOFF character.Otherwise normal transmission is disabled.

Further, in the embodiment shown, when a receive buffer (ASCII orbinary) exceeds 50% full or alternatively, no characters have beenreceived for more than approximately 60 milliseconds, the associatedport task, e.g. port task 100, is initiated by the periodic interrupttimer ISR. This is accomplished by setting a character received bit inthe operation field of the port's port structure.

Typically, an IED will only transmit to its particular port. However,when the port is in the transparent mode, it will transmit data to adifferent port defined in the requester field is its own port datastructure. To initiate such a message transmittal to the different port,the requesting port task writes the message information to the portstructure of the desired port and then sets the initiate-transmit flagfor that particular port. When this flag is detected, the transmit ISRfor that port is enabled. When the transmit ISR detects the end of thedesired data, it then sets the transmit complete bit, and the transmitcomplete operation bit is then set in the initiating port task'soperations field is its own port data structure.

Whenever a character is received at a particular port, the periodicinterrupt timer ISR resets a time-out timer associated with that porttask. If the time ever does expire, the port task is reinitiated, bysetting the port time-out bit within the operations field of that port'sport structure. Ports in the transparent mode then use the time-out bitto initiate termination of the transparent mode, while master ports useit as a suit command.

As shown in FIG. 3 and mentioned above, individual port tasks arecapable of communicating with each other. This is necessary for a numberof reasons, including the accomplishment of the following functions:port reset, settings changes, transparent mode initiation, transparentmode termination, autoband operation and autoconfiguration operation. Ina port reset operation, the port task requesting the change sets theport reset bit within the operations field of the other port's portstructure and sets the requester field. The receiving port task mustreinitialize its configuration. It is disabled as long as it is beingreset. When the reset is complete, the initiating port task is notified.

When the settings for a particular port task are changed (so as torequest a different issue condition or different data), the process mustbe controlled to prevent simultaneous changes in other port tasks. Everyaffected port task, however, must know about the change. The port taskperforming the changing of the settings initially sets a flag to theport task and the fast meter task for the affected port, so as toprevent those tasks from actively using the settings. Those flags arecleared once the settings changes are accomplished.

As indicated above, the various ports in the communication processor canoperate either in a “transparent” mode or a normal mode. In atransparent mode, the data is moved through the communications processorwithout any processing. The communications processor is thus transparentto the data. A master port may initiate transparent mode communicationbased on a received command. There is first a verification of theparticular port which is to go into the transparent mode, and therequest bit within the operations field of that port's port structure isthen set to the transparent mode. If a requested port is able to go intotransparent mode, it must also set a transparent mode initiate bit inthe operations field of the master port's port structure.

To terminate the transparent mode, the master port sets the transparentmode terminate bit within the operating field of the transparent port'sport structure and then sets that port's port event. The slave port,upon recognizing this operation, sets the transparent mode terminate bitwithin the operations field of the requesting port's port structure, andclears the request field within its own port structure.

FIGS. 5 and 6 show the generalized flow of functions for the port task100 and the PIT ISR, consolidating in simplified form the informationprovided above. The port task is generally event driven, while the PITISR runs every 3.9 milliseconds as indicated above.

The operation of the communications processor is illustrated in thefollowing example involving the connection of a protective relay to oneIED port. Initially, the protective relay is connected to a selected IEDback panel port. A terminal or computer is typically connected to thefront panel port. The initial command settings from the front panel portterminal produce the proper formatting data for communication with theparticular IED. In some cases, when it is a particular known device,automatic configuration of the port is possible. Otherwise, the specificbaud rate, data bits, stop bit, etc. parameters must be established withthe connected device. A wide variety of baud rates (up to 38,400,depending upon port configuration) may be accommodated. An XON and XOFF“handshake” is used to initiate and terminate communication.

Following this port configuration process, data communication involvingthe sending and receiving of messages between a user, such as aterminal, computer or remote unit and the connected IED device canoccur. Settings may also be established which request certain data fromthe connected IED at certain times. The obtaining of data can be done onan automatic, periodic basis or on a one-time basis. The parsing rulesfor the data processing are also established. User-defined commands forthe particular port are also established, to be used by the commandlogic in the apparatus. Upon the occurrence in time of the issuecondition (periodic, specific time, specific day, etc.), a request forthe data specified in the command condition portion of the setting willbe provided by the port task to the transmit better and then through theoutput ISR for the desired port to the relay.

The relay will respond in a short period of time, such as with meterdata, at the issue condition intervals. The data comes in through theinput ISR and, if it is fast meter data (in binary code), will beapplied to the binary buffer, and then to the fast meter acquire task,from where it is processed and then sent to the database. If the data isnot fast meter data, then it is processed (parsed) by the port task andstored in the RAM database. If the data is an event report, or otherdata requiring long-term storage, it may be stored in flash memory. Datain the database is selected and retrieved from the database via the porttask and provided through a selected port to either a local terminal ora remote terminal on an automatic or one-time basis, where the data canbe reviewed and analyzed, as desired.

Accordingly, a power system multi-port communications processor has beendescribed which is capable of multi-task, multi-user communicationsprocessing for a variety of intelligent electronic devices, such asprotective relays, thereby producing a sophisticated communicationintegration capability at a power system substation. The communicationsprocessor includes the ability to configure the communication parametersof each of the ports to match that of the selected device attached toit, as well as a database capability for storing data and acommunications processing capability for processing the data.

Although a preferred embodiment of the invention has been disclosedherein for illustration, it should be understood that various changes,modifications and substitutions may be incorporated in such embodimentwithout departing from the spirit of the invention, which is defined bythe claims which follow.

1. A communications processor apparatus for integrating communicationbetween a plurality of electronic devices having data communicationcapability present at a given location in a power system or connectedremotely thereto, the apparatus comprising: an electronic network systemhaving a plurality of port positions to which electronic devices may beconnected, including at least one port position to which an apparatusfor entry of control commands may be connected and at least one portposition through which data obtained from said electronic devices may betransmitted to other electronic devices; receiver-transmitter means forcommunication of data between a) an electronic device connected to aport position of the communications processor apparatus and b) theremainder of the communications processor apparatus; means forconfiguring communication parameters associated with each port positionfor proper data communication with the electronic device connectedthereto; means for storing and retrieving data obtained from theelectronic devices; means for storage of control commands entered by auser of the apparatus; means for processing data obtained from theelectronic devices, wherein the means for processing data includes meansfor parsing received data in accordance with selected rules; and controlmeans for controlling the flow of data and control commands within theapparatus and between said ports port positions.
 2. An apparatus ofclaim 1, wherein the ports to which protective relays or meters areconnected are identified as Intelligent Electric Device (IED) ports, andwherein the ports to which a terminal or modem device are connected areidentified as master ports, and wherein the apparatus includes at leastone master port and at least six IED ports.
 3. An apparatus of claim 2,wherein the apparatus includes a port to which a printer may beconnected for printing out data obtained from the IED ports.
 4. Anapparatus of claim 1, including means for automatically configuring aport for selected devices.
 5. An apparatus of claim 1, wherein thecommunication parameters include baud rate, number of data bits, stopbit and parity bit.
 6. An apparatus of claim 1, wherein thereceiver-transmitter means comprises a plurality of quad universalasynchronous receiver-transmitter means, each of which services aplurality of ports.
 7. An apparatus of claim 1, wherein the apparatus isresponsive to control commands, including user-defined commands to carryout specific functions associated with the control commands.
 8. Anapparatus of 7, including means for automatically requesting of andobtaining data from a particular port device in response to a commandsetting for said particular port.
 9. An apparatus of claim 1, includinga plurality of contact input means for accepting signals from protectiverelays and a plurality of contact output means for providing outputsignals.
 10. An apparatus of claim 9, wherein at least one of thoseoutput signals is an alarm signal.
 11. An apparatus of claim 1,including means for providing time information for synchronizing timeclocks for each of the devices connected to said ports.
 12. An apparatusof 11, wherein a source of the time information is an externallygenerated IRIG-B time code signal.
 13. An apparatus of 11, including aninternal clock for generating the time information.
 14. An apparatus ofclaim 1, including means for making the apparatus transparent toreceived data from a port.
 15. An apparatus of claim 14, wherein theapparatus can be transparent to data from more than one portsimultaneously.
 16. An apparatus of claim 1, including an internal modemto which an external telephone line may be connected for transmission ofselected data to a remote location.
 17. An apparatus of claim 1, whereinthe apparatus includes buffer storage associated with each port.
 18. Anapparatus of claim 1, including means for temporarily storing data whichhas been received from the individual ports and parsed.
 19. An apparatusof claim 1, including a long-term non-volatile memory for storage ofselected data.
 20. An apparatus of claim 1, including buffer means ateach port for separate storage of binary format and ASCII format data.21. An apparatus of claim 1, including means for processing and storingfast meter binary data from IED devices.
 22. An apparatus of claim 1,wherein the data processing means includes means for parsing receiveddata in accordance with selected rules.
 23. An apparatus of claim 22 1,wherein the parsing rules are pre-established.
 24. An apparatus of claim22 1, wherein the parsing rules are defined by an operator.